'Program name: CCHRC7 Roof 2008-10-08.CR1 'MODIFICATION OF: CCHRC7 Roof 2008-09-19.CR1 'MODIFIED BY: R.F.Paetzold 'DATE MODIFIED: 2008 October 08 'MODIFICATIONS: ' Changed snow depth sensor height to 128.1 from 114 cm. ' Modified Hourly Output Table for Snow Depth Measurements: HrlySnow 'DATE LOADED: 8 October 2008 'MODIFICATION OF: CCHRC7 Roof 2008-5-27.CR1 'MODIFIED BY: R.F.Paetzold 'DATE MODIFIED: 2008 September 18 'MODIFICATIONS: ' Added code to filter snow depth data. ' Added Hourly Output Table for Snow Depth Measurements: HrlySnow 'DATE LOADED: 19 September 2008 ' Modification of program: CCHRCRoof2008-3-22 ' changed SR50A height from 129 to 114 per measurement off of bare ground. ' added measurement instructions for NR Lite ' Modification of Program name: CCHRCRoof2008-2-1 ' moved SR50A from C7 to C5 ' moved CS616s from C5 to C2 ' Modification of Program name: CCHRC Roof 2007-10-22 ' - Fixed precip error. It was measured every 1 minute, yet the table ' was called every execution interval 5 seconds. The precip values where x12 too large. ' - To follow current standards, I moved all measurement under the main scan interval of 5 seconds except for ' thermistors and snow depth (every 1 minute) and soil moisture (every 5 minutes) ' - removed temperature correction on CS616s. This was causing measurement errors when corresponding ' soil temperatures were >10C. ' Modification of PROGRAM: CCHRC7 Roof 2007_08_29.CR1 ' Modified By: Austin McHugh ' Modification: fixed SR50 measurement. remove the "a" before the M1! ' added the cleaning routine to the SR50 Averages. 'MODIFICATION OF: CCHRC5 Roof 2006_08_07.CR1 'MODIFIED BY: R.F.Paetzold 'DATE MODIFIED: 2007 August 28 'MODIFICATIONS: ' Changed Scan Rate to 5 seconds from 1 minute. ' Changed station ID to 7 from 2. Utilidoor station ID is 2. ' Stopped measurement & output of third soil moisture sensor. There are only 2 sensors. ' Added an RM Young 5103 Wind Monitor (speed and direction) ' Added an RM Young 03101 Wind Sentry (speed) ' Added a CS105 Barometric Pressure sensor ' Added a NR Lite-L Net Radiometer ' Changed an hourly data table called HrlyMet to HrlyAtms ' Added an hourly data table called HrlySubs ' Added a daily data table called DalyAtms ' Added a daily data table called DalySubs ' Removed HrlyMeas table ' Removed DalyMeas table ' Added air temperature measurements (triplicate YSI thermistors) at 2 and 4 feet. 'DATE LOADED: 29 August 2007 'MODIFICATION OF: CCHRC5 Utilidoor 2006_06_06.CR1 'MODIFIED BY: AMcHugh 'DATE MODIFIED: 2007August7 'MODIFICATIOINS: ' changed the name of the program to Roof from Utilidor which it is not and never was. ' There was a misunderstanding as to where the datalogger was located. ' added a TE525WS rain gage. ' added an hourly data table called HourlyMet ' delete wiring and output information as is now standard. ' removed 20 mniute measurement of battery voltage and internal temperature and moved to main ' one-minute scan ' will be adding more sensors soon. 'DATE LOADED: 'MODIFICATION OF: CCHRC5 Utilidoor 2006_05_20.CR1 'MODIFIED BY: R.F. PAETZOLD 'DATE MODIFIED: 6 June 2006 'MODIFICATIONS: Changed the reading of the GWS thermistors in the multiplexer #1 sub ' scan loop from one BrHalf statement to three BrHalf statements ' with I=I+1 inbetween each and the I=I+3 incremental increase was ' eliminated. 'DATE LOADED: 'MODIFICATION OF: CCHRC5 Utilidoor 2006_05_04.CR1 'MODIFIED BY: R.F. PAETZOLD 'DATE MODIFIED: 20 May 2006 'MODIFICATIONS: Changed multiplier from 0.001 to 1000 to convert kOHM to OHM for BSI ' thermistor temperature calculation 'DATE LOADED: 'ORIGINAL PROGRAM: CCHRC5 Utilidoor 2006_05_04.CR1 'WRITTEN BY: R.F. PAETZOLD 'DATE WRITTEN: 3 May 2006 'DATE LOADED: 'STATION: CCHRC #7 South Bay Green Roof 'STATION ID: 7 'ARRAY ID: 'DATALOGGER ID: 'NOTES: USE 60Hz FILTER FOR MEASUREMENTS WHERE POSSIBLE TO MINIMIZE INTERFERENCE FROM ' BUILDING ELECTRICAL COMPONENTS. ''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' DECLARATIONS & DEFINITIONS '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''' ' Set Station Name as: CCHRC_7 South Bay Green Roof StationName (CCHRC_7) 'Changed To CCHRC_7 From CCHRC_2 by PAETZOLD 08/15/07 'DECLARE CONSTANTS 'STATION ID Changed to 7 from 2 by PAETZOLD 08/15/07 Const ID = 7 'INSERT STATION ID HERE <---------- 'FIXED RESISTOR VALUE FOR GWS THERMISTOR CIRCUITS Const Rf_1 = 1.0 'INSERT FIXED RESISTOR #1 VALUE (kOHM) HERE <---------- 'STEINHART & HART EQUATION CONSTANTS Const a = 0.0014654354 Const b = 0.0002386780 Const c = 0.0000001000 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''' Calibration Factor for Kipp & Zonen NR-LITE Net Radiometer '''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'The Calibration Factor provided by Kipp & Zonen in the Calibration Certificate or on a ' small label attached to the connecting arm near the head of the sensor, MUST BE ' DIVIDED INTO 1000 as the factor provided in in units of micro-volts per W/m2 and ' needs to be converted to W/m2 per milli-volt. ' 63.29 (W/m2)/mV is a nominal Calibration Factor. It should be replaced with ' the calibration factor given on the label attached to the connecting arm near the ' sensor head. ' serial number of NR-Lite 072522 from before May2008 Const CF_NR = 15.6 'ENTER FACTORY CORRELATION COEFFICIENT HERE <========== Const CF_NetRad = 1000/CF_NR 'CALIBRATION COEFFICIENT DIVIDED BY 1000 TO CONVERT uV/W/m2 TO W/m2/mV '''''''''''''''''''''''''''''''''''''''''''''''' '''''' SR50 SNOW DEPTH SENSOR HEIGHT (cm) '''''' '''''''''''''''''''''''''''''''''''''''''''''''' 'SensorHt is the height of the SR50 snow depth sensor above the ground. '200cm is an estimated height of the SR50 snow depth sensor above the ground. It ' should be replaced with the field measured height. Const SD_Ht = 128.1 'ENTER HEIGHT OF SNOW DEPTH SENSOR ABOVE GROUND (cm) HERE <======= ' Changed from 114 by Paetzold 10/08/08 'DECLARE VARIABLES Dim I Dim J Dim therm(21) Dim mc(4) Dim SW(4) Dim D(21) Dim RH_Frac Dim Station_ID Dim X 'Added for Alternative Snow Monitoring Scheme -- PAETZOLD 09/08/2008 'DECLARE PUBLIC VARIABLES Public PTemp, batt_volt Public AT, RH, DP public SVP, VP, SVP_mb, VP_mb Public GWS_Therm_kOHM (21), GWS_T_deg_C (21) Public WS_ms1, WD1, WS_ms2 Public Pb Public NetRad_mV, NetRad_W_m2, NetRadWindCorr_W_m2 Public Precip Public DT(2), TCDT, Snow, SR50_Bad Public CS616_us (2), CS616_SM (2) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 'NOTE: CS616_us IS THE RAW UNCORRECTED SENSOR MEASUREMENT (micro-seconds) ' CS616_SM IS THE TEMPERATURE CORRECTED MEASUREMENT CONVERTED TO VOL H2O CONTENT ' Added Following 3 Public Statements for Alternative Snow Monitoring Scheme ' -- PAETZOLD 09/08/2008 Public SD, SR50_Q, SR50_tc public SR50_f1h, SR50_f4h, SR50_f12h ' filtered values public SR50_fw1h, SR50_fw4h, SR50_fw12h ' weighted filtered values 'DEFINE ALIASES 'Alias Therm(1) = SoilT1 'Alias Therm(2) = SoilT2 'Alias Therm(3) = SoilT3 'Alias Therm(4) = SoilT4 'Alias Therm(5) = SoilT5 'Alias Therm(6) = SoilT6 'Alias Therm(7) = SoilT7 'Alias Therm(8) = SoilT8 'Alias Therm(9) = SoilT9 'Alias Therm(10) = SoilT10 'Alias Therm(11) = SoilT11 'Alias Therm(12) = SoilT12 'Alias Therm(13) = SoilT13 'Alias Therm(14) = SoilT14 'Alias Therm(15) = SoilT15 Alias Therm(16) = AirT_4ft_1 Alias Therm(17) = AirT_4ft_2 Alias Therm(18) = AirT_4ft_3 Alias Therm(19) = AirT_2ft_1 Alias Therm(20) = AirT_2ft_2 Alias Therm(21) = AirT_2ft_3 Alias AT = AirT_HMP45C Alias RH = RelativeHumidity Alias DP = Dew_Point Alias VP = VaporPress Alias SVP = SatVaporPress Alias WS_ms1 = WindSpeedHigh Alias WD1 = WindDirHigh Alias WS_ms2 = WindSpeedLow Alias Pb = BaroPressure 'Added Following for Alternative Snow Monitoring Scheme -- PAETZOLD 09/08/2008 Alias SD = UnfilteredSnowDepth 'Alias PTemp = DataloggerPanelTemperature 'Alias CS616_SM(1) = SoilWaterContent1 'Alias CS616_SM(2) = SoilWaterContent2 Alias Snow = SnowDepth Alias DT(2) = SnowDataQuality 'Alias Precip = SummerRain 'DEFINE UNITS Units Precip = inches Units Therm (1) = Voltage Ratio X Units Therm (2) = Voltage Ratio X Units Therm (3) = Voltage Ratio X Units Therm (4) = Voltage Ratio X Units Therm (5) = Voltage Ratio X Units Therm (6) = Voltage Ratio X Units Therm (7) = Voltage Ratio X Units Therm (8) = Voltage Ratio X Units Therm (9) = Voltage Ratio X Units Therm (10) = Voltage Ratio X Units Therm (11) = Voltage Ratio X Units Therm (12) = Voltage Ratio X Units Therm (13) = Voltage Ratio X Units Therm (14) = Voltage Ratio X Units Therm (15) = Voltage Ratio X Units Therm (16) = Voltage Ratio X Units Therm (17) = Voltage Ratio X Units Therm (18) = Voltage Ratio X Units Therm (19) = Voltage Ratio X Units Therm (20) = Voltage Ratio X Units Therm (21) = Voltage Ratio X Units GWS_Therm_kOHM (1) = kilo ohms Units GWS_Therm_kOHM (2) = kilo ohms Units GWS_Therm_kOHM (3) = kilo ohms Units GWS_Therm_kOHM (4) = kilo ohms Units GWS_Therm_kOHM (5) = kilo ohms Units GWS_Therm_kOHM (6) = kilo ohms Units GWS_Therm_kOHM (7) = kilo ohms Units GWS_Therm_kOHM (8) = kilo ohms Units GWS_Therm_kOHM (9) = kilo ohms Units GWS_Therm_kOHM (10) = kilo ohms Units GWS_Therm_kOHM (11) = kilo ohms Units GWS_Therm_kOHM (12) = kilo ohms Units GWS_Therm_kOHM (13) = kilo ohms Units GWS_Therm_kOHM (14) = kilo ohms Units GWS_Therm_kOHM (15) = kilo ohms Units GWS_Therm_kOHM (16) = kilo ohms Units GWS_Therm_kOHM (17) = kilo ohms Units GWS_Therm_kOHM (18) = kilo ohms Units GWS_Therm_kOHM (19) = kilo ohms Units GWS_Therm_kOHM (20) = kilo ohms Units GWS_Therm_kOHM (21) = kilo ohms Units GWS_T_deg_C (1) = deg C Units GWS_T_deg_C (2) = deg C Units GWS_T_deg_C (3) = deg C Units GWS_T_deg_C (4) = deg C Units GWS_T_deg_C (5) = deg C Units GWS_T_deg_C (6) = deg C Units GWS_T_deg_C (7) = deg C Units GWS_T_deg_C (8) = deg C Units GWS_T_deg_C (9) = deg C Units GWS_T_deg_C (10) = deg C Units GWS_T_deg_C (11) = deg C Units GWS_T_deg_C (12) = deg C Units GWS_T_deg_C (13) = deg C Units GWS_T_deg_C (14) = deg C Units GWS_T_deg_C (15) = deg C Units GWS_T_deg_C (16) = deg C Units GWS_T_deg_C (17) = deg C Units GWS_T_deg_C (18) = deg C Units GWS_T_deg_C (19) = deg C Units GWS_T_deg_C (20) = deg C Units GWS_T_deg_C (21) = deg C Units AT = deg C Units DP = deg C Units RH = percent Units Pb = mb_uncorr_elev Units NetRad_mV = mV Units NetRadWindCorr_W_m2 = W/m2 Units CS616_SM(1) = VolFracSoilH2O Units CS616_SM(2) = VolFracSoilH2O Units CS616_us(1) = micro seconds Units CS616_us(2) = micro seconds Units Precip = inches Units Snow = cm Units SD = cm 'Added for Alternative Snow Monitoring Scheme -- PAETZOLD 09/08/2008 Units WS_ms1 = m/s Units WD1 = deg Units WS_ms2 = m/s Units PTemp = deg C Units Batt_Volt = Volts 'DEFINE DATA TABLES 'HOURLY DIAGNOSTICS TABLE DataTable (HrlyDiag,1,-1) DataInterval (0,60,Min,0) Sample (1,Station_ID,fp2) Average (1,batt_volt,FP2,False) Average (1,PTemp,FP2,False) EndTable 'HOURLY RAW MEASUREMENTS TABLE DataTable (HrlyRaw,1,-1) DataInterval (0,60,Min,0) Sample (1,Station_ID,fp2) Average (15,GWS_Therm_kOHM(),FP2,False) Average (2,CS616_us(),FP2,False) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 Average (1,DT,FP2,False) Maximum (1,DT,FP2,False,False) Minimum (1,DT,FP2,False,False) Average (1,TCDT,FP2,False) Maximum (1,TCDT,FP2,False,False) Minimum (1,TCDT,FP2,False,False) Average (1,NetRad_mV,FP2,False) Average (1,NetRad_W_m2,FP2,False) EndTable 'HOURLY ATMOSPHERIC MEASUREMENTS TABLE DataTable (HrlyAtms,1,-1) DataInterval (0,60,Min,0) Sample (1,Station_ID,fp2) Average (1,AT,FP2,False) Maximum (1,AT,FP2,False,False) Minimum (1,AT,FP2,False,False) Average (1,RH,FP2,False) Maximum (1,RH,FP2,False,False) Minimum (1,RH,FP2,False,False) Average (3,GWS_T_deg_C(16),FP2,False) Maximum (3,GWS_T_deg_C(16),FP2,False,False) Minimum (3,GWS_T_deg_C(16),FP2,False,False) Average (3,GWS_T_deg_C(19),FP2,False) Maximum (3,GWS_T_deg_C(19),FP2,False,False) Minimum (3,GWS_T_deg_C(19),FP2,False,False) Sample (1,WS_ms1,FP2) Sample (1,WD1,FP2) WindVector (1,WS_ms1,WD1,FP2,False,0,0,0) FieldNames ("WindSpeedHi:m/s,VectorWindDirHi:deg,WindDirHiStdDev") Maximum (1,WS_ms1,FP2,False,False) Sample (1,WS_ms2,FP2) Average (1,WS_ms2,FP2,False) Maximum (1,WS_ms2,FP2,False,False) Average (1,NetRadWindCorr_W_m2,FP2,False) Average (1,Pb,FP2,False) Totalize (1,Precip,FP2,False) Sample (1,Snow,FP2) Sample (1,SnowDataQuality,FP2) Average (1,Snow,FP2,SR50_Bad) ' cleaned Maximum (1,Snow,FP2,False,False) Minimum (1,Snow,FP2,False,False) StdDev (1,Snow,FP2,False) Average (1,SnowDataQuality,FP2,False) EndTable 'HOURLY SOIL MEASUREMENTS TABLE DataTable (HrlySubs,1,-1) DataInterval (0,60,Min,0) Sample (1,Station_ID,fp2) Average (15,GWS_T_deg_C(),FP2,False) Average (2,CS616_SM(),FP2,False) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 EndTable 'HOURLY SOLAR THERMAL MEASUREMENTS TABLE DataTable (HrlySolr,1,-1) DataInterval (0,60,Min,0) Sample (1,Station_ID,fp2) EndTable 'DAILY ATMOSPHERIC MEASUREMENTS TABLE DataTable (DalyAtms,1,-1) DataInterval (0,1440,Min,0) Sample (1,Station_ID,fp2) Average (1,AT,FP2,False) Maximum (1,AT,FP2,False,False) Minimum (1,AT,FP2,False,False) Average (1,RH,FP2,False) Maximum (1,RH,FP2,False,False) Minimum (1,RH,FP2,False,False) Average (3,GWS_T_deg_C(16),FP2,False) Maximum (3,GWS_T_deg_C(16),FP2,False,False) Minimum (3,GWS_T_deg_C(16),FP2,False,False) Average (3,GWS_T_deg_C(19),FP2,False) Maximum (3,GWS_T_deg_C(19),FP2,False,False) Minimum (3,GWS_T_deg_C(19),FP2,False,False) WindVector (1,WS_ms1,WD1,FP2,False,0,0,0) FieldNames ("WindSpeedHigh:m/s,VectorWindDirHi:deg,WindDirHiStdDev") Maximum (1,WS_ms1,FP2,False,False) Average (1,WS_ms2,FP2,False) Maximum (1,WS_ms2,FP2,False,False) Average (1,NetRadWindCorr_W_m2,FP2,False) Average (1,Pb,FP2,False) Totalize (1,Precip,FP2,False) Average (1,Snow,FP2,SR50_Bad) 'cleaned EndTable 'DAILY SUBSURFACE MEASUREMENTS TABLE DataTable (DalySubs,1,-1) DataInterval (0,1440,Min,0) Sample (1,Station_ID,fp2) Maximum (15,GWS_T_deg_C(),FP2,False,False) Average (15,GWS_T_deg_C(),FP2,False) Minimum (15,GWS_T_deg_C(),FP2,False,False) Maximum (2,CS616_SM(),FP2,False,False) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 Average (2,CS616_SM(),FP2,False) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 Minimum (2,CS616_SM(),FP2,False,False) 'CHANGED to 2 reps from 3 reps -- PAETZOLD 08/21/07 EndTable 'DAILY SOLAR THERMAL MEASUREMENTS TABLE DataTable (DalySolr,1,-1) DataInterval (0,1440,Min,0) Sample (1,Station_ID,fp2) EndTable 'HOURLY SNOW MEASUREMENTS TABLE Added -- PAETZOLD 09/18/08 DataTable (HrlySnow,1,-1) DataInterval (0,60,Min,0) Sample(1,Station_ID,fp2) Average(1,TCDT,fp2,0) 'Temperature Corrected Distance From Sensor to Surface Sample (1,TCDT,FP2) 'Temperature Corrected Distance From Sensor to Surface 'Snow Depth from Option 1 -- Original Campbell Scientific Program Example Average (1,SD,FP2,False) 'Unfiltered Snow Depth (cm) Sample (1,SD,FP2) 'Unfiltered Snow Depth (cm) 'Snow Depth from Option 2 -- Time Filtered Snow Depth Values Sample(1,SR50_f1h,fp2) 'Filtered Snow Depth, 1-hr time constant Sample(1,SR50_f4h,fp2) 'Filtered Snow Depth, 4-hr time constant Sample(1,SR50_f12h,fp2) 'Filtered Snow Depth, 12-hr time constant Sample(1,SR50_fw1h,fp2) 'Filtered Snow Depth, 1-hr time constant & weighting factor Sample(1,SR50_fw4h,fp2) 'Filtered Snow Depth, 4-hr time constant & weighting factor Sample(1,SR50_fw12h,fp2) 'Filtered Snow Depth, 12-hr time constant & weighting factor Minimum (1,SR50_Q,FP2,0,0) 'Sensor Quality Value Average(1,SR50_Q,fp2,0) 'Sensor Quality Value Maximum (1,SR50_Q,FP2,0,0) 'Sensor Quality Value 'Snow Depth from Option 3 -- Measurement Quality Filtered Snow Depth Values Sample (1,Snow,FP2) 'Sample Snow Depth From Current CCHRC Scheme Sample (1,SnowDataQuality,FP2) 'Measurement Quality From Current CCHRC Scheme Average (1,Snow,FP2,SR50_Bad) ' cleaned; Avg Snow Depth From Current CCHRC Scheme Maximum (1,Snow,FP2,False,False) 'Max Snow Depth From Current CCHRC Scheme Minimum (1,Snow,FP2,False,False) 'Min Snow Depth From Current CCHRC Scheme StdDev (1,Snow,FP2,False) 'Std Dev Snow Depth From Current CCHRC Scheme Average (1,SnowDataQuality,FP2,False) 'Measurement Quality From Current CCHRC Scheme 'Air Temperature Measurements from HMP45C Sensor Average(1,AT,fp2,0) 'Air Temperature Sample (1,AT,FP2) 'Air Temperature EndTable ''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' BEGIN MAIN PROGRAM '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''' BeginProg ' CHANGED Scan to 5 seconds from 1 minute -- PAETZOLD 08/21/07 Scan (5,Sec,0,0) 'SCAN PROGRAM AT 5-Second INTERVALS Station_ID = ID 'STATION ID ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Measure Wind Speed & Direction ' ' ADDED -- PAETZOLD 08/21/07 ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''' ''''' READ RM YOUNG 05103 WIND MONITOR ''''' PulseCount (WS_ms1,1,1,1,1,.098,0) 'Wind Speed (m/s) BrHalf(WD1,1,mV2500,12,Vx2,1,2500,true,0,_60Hz,355,0) 'Wind Direction (deg) If WD1>=360 Then WD1=0 ''''' READ RM YOUNG 03101 WIND MONITOR ''''' PulseCount (WS_ms2,1,2,1,1,0.75,0.02) 'Wind Speen (m/s) ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' DIAGNOSTICS ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''' PanelTemp (PTemp,_60Hz) 'MEASURE DATALOGGER PANEL TEMPERATUE (deg C), 'WITH A 60Hz FILTER Battery (Batt_volt) 'MEASURE BATTERY VOLTAGE (V) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Measure Air Temperature & Relative Humidity ' ' ADDED -- PAETZOLD 08/21/07 ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''' READ HMP45C AIR TEMPERATURE & RELATIVE HUMIDITY SENSOR '''''''''' ''''' Calculate Saturated Vapor Pressure, Vapor Pressure, & Dew Point ''''' Delay (0,150,mSec) VoltSe (AT,1,mV2500,7,1,0,_60Hz,0.1,-40.0) 'Air Temperature (deg C) VoltSe (RH,1,mV2500,8,1,0,_60Hz,0.1,0) 'Relative Humidity (%) If RH > 100 AND RH < 108 Then RH = 100 'Correct RH >100% to 100 RH_Frac = RH*0.01 'Convert RH to fraction SatVP (SVP,AT) 'Calculate Saturated Vapor Pressure (kPa) SVP_mb = SVP * 10 'Convert SVP from kPa to mb VP = SVP * RH_Frac 'Calculate Vapor Pressure (kPa) VP_mb = VP * 10 'Convert VP from kPa to mb DewPoint (DP,AT,RH) 'Dew Point (deg C) ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Measure Barometric Pressure ' ' ADDED -- PAETZOLD 08/21/07 ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''' ''''' READ CS105 BAROMETRIC PRESSURE SENSOR ''''' ''''' Uncorrected for elevation ''''' VoltSe (Pb,1,mV2500,11,1,0,_60Hz,0.184,600) 'Barometric Pressure (mb) ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Measure Net Radiation ' ' ADDED -- PAETZOLD 08/21/07 ' ' ' '************************************************ VoltDiff(NetRad_mV,1,mv25,5,True,0,_60Hz,1,0) NetRad_W_m2 = NetRad_mV * CF_NetRad If WindspeedHigh >=5 Then NetRadWindCorr_W_m2=NetRad_W_m2*(1+0.021286*(WindspeedHigh-5)) Else NetRadWindCorr_W_m2 = NetRad_W_m2 EndIf ''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' Measure Precip Gage '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''' ' CHANGED from PulseCount on P1 to PulseCount on C3 -- PAETZOLD 08/21/07 PulseCount (Precip,1,13,2,0,0.01,0) ''''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' BEGIN 1-MINUTE MEASUREMENT LOOP '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''''' If IfTime (0,60,Sec) Then ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Measure Snow Depth ' ' ADDED -- PAETZOLD 08/21/07 ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''' ''''' READ SR50 SONIC RANGING SENSOR ''''' ''''' Snow Depth ''''' 'SR50 Sonic Ranging Sensor (SDI-12 Output) measurements: 'Distance (DT), 'Temperature Corrected Distance (TCDT), 'and Snow Depth (Snow) SDI12Recorder(DT,5,0,"M1!",100.0,0) 'MEASURE DISTANCE TO SNOW (m) AND QUALITY ' DT = 100*DT 'CONVERTS DISTANCE TO SNOW TO cm FROM m TCDT = DT*SQR((AT+273.15)/273.15) 'CORRECT DISTANCE FOR AIR TEMPERATURE (cm) Snow = SD_Ht-TCDT 'CALCULATE SNOW DEPTH (cm) ' create a variable to not process out-of-range snowdepth values If Snow < -25 OR Snow > 100 Then SR50_Bad = 1 Else SR50_Bad = 0 ' remove the multiplier from the quality number SnowDataQuality=SnowDataQuality/100 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''' Added Alternative Snow Monitoring Scheme -- PAETZOLD 09/08/2008 ''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' SR50_Q = SnowDataQuality SR50_tc = -DT*SQR((AT+273.15)/273.15) '' offset by assumed sensor height for resultant snowdepth [cm]: SD = SD_Ht+SR50_tc '' update SR50_acc unless either DT or SR50_Q is 0 if (DT <> 0) AND (SR50_Q <> 0) then '' filter fraction is sensorScan / timeConstant '' sensorScan is set in the main loop to 60 seconds '' timeConstant is 1, 4, and 12 hours (in seconds) x = 60 / 3600 '' 1 hour time constant SR50_f1h = SR50_tc * x + SR50_f1h * (1 - x) x = x / 4 '' 4 hour time constant SR50_f4h = SR50_tc * x + SR50_f4h * (1 - x) x = x / 3 '' 12 hour time constant SR50_f12h = SR50_tc * x + SR50_f12h * (1 - x) '' repeat filters with quality and wind weighting factors '' applied to the time constants: '' quality factor to diminish impact when quality is poor; '' arbitrary function used: 1=best, lower=poorer x = 162 ^ 2 / SR50_Q ^ 2 '' wind factor to diminish impact when wind is high... '' wind factor not used, so set to 1 x = x * 1 '' start with weighted 1 hour time constant: x = x * 60 / 3600 '' 1 hour time constant SR50_fw1h = SR50_tc * x + SR50_fw1h * (1 - x) x = x / 4 '' weighted 4 hour time constant SR50_fw4h = SR50_tc * x + SR50_fw4h * (1 - x) x = x / 3 '' weighted 12 hour time constant SR50_fw12h = SR50_tc * x + SR50_fw12h * (1 - x) endif ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''' End Added Alternative Snow Monitoring Scheme -- PAETZOLD 09/08/2008 ''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' READ AM16/32 #1 MULTIPLEXER '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''' ' READ 15 GWS THERMISTORS CHANGED to read 21 thermistors -- PAETZOLD 08/21/07 PortSet (1 ,1 ) 'TURN ON AM16/32 #1 MULTIPLEXER, SET PORT 1 HIGH I = 1 'INITIALIZE INDEX INTERGER I TO ONE ' CHANGED to 7 iterations from 5 iterations -- PAETZOLD 08/21/07 SubScan (0,Sec,7) 'SCAN LOOP -- 7 ITERATIONS PulsePort (4 ,10000) 'ADVANCE AM16/32 #1 GROUP BY 1, PULSE PORT 4 'MEASURE GWS THERMISTORS, (Voltage Ratio X = Rs/(Rs+Rf)) 'CHANGED MeasPEx FROM 1 TO 3 SO ALL REPS ARE EXCITED WITH Ex1 -- PAETZOLD 05/20/06 'CHANGED FROM ONE BrHalf STATEMENT TO THREE WITH I=I+1 INBETWEEN -- PAETZOLD 06/06/06 BrHalf (therm(I),1,mV2500,1,Vx1,1,2500,True ,0,_60Hz,1.0,0) I = I + 1 BrHalf (therm(I),1,mV2500,2,Vx1,1,2500,True ,0,_60Hz,1.0,0) I = I + 1 BrHalf (therm(I),1,mV2500,3,Vx1,1,2500,True ,0,_60Hz,1.0,0) I = I + 1 NextSubScan PortSet (1 ,0 ) 'TURN OFF AM16/32 #1 MULTIPLEXER, SET PORT 1 LOW ''CONVERT MEASURED VOLTAGE RATIO TO RESISTANCE (kOHM) FOR 15 GWS THERMISTORS'' For I=1 To 21 'CHANGED to 21 from 15 -- PAETZOLD 08/21/07 GWS_Therm_kOHM(I) = Rf_1*therm(I)/(1-therm(I)) Next I ''''' CONVERT GWS THERMISTOR RESISTANCE TO deg C FOR 15 GWS THERMISTORS ''''' For I=1 To 21 'CHANGED to 21 from 15 -- PAETZOLD 08/21/07 D(I) = LN (1000*GWS_Therm_kOHM(I)) 'ln resistance (ohm) GWS_T_deg_C(I) = (1/(a + b*D(I) + c*(D(I))^3)) - 273.15 'Steinhart & Hart Equation Next I EndIf 'END 1-MINUTE MEASUREMENT LOOP ''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' 5-MINUTE MEASUREMENT LOOP ' ' ' ''''''''''''''''''''''''''''''''''''''''''''''''' If IfTime (0,5,Min) Then 'BEGIN 5-MINUTE MEASUREMENT LOOP 'MEASURE CS616 SOIL MOISTURE SENSORS (microseconds) CS616 (CS616_us(),2,5,2,3,1.0,0) For I = 1 TO 2 'CHANGED to 2 from 3 -- PAETZOLD 08/21/07 'CONVERT CORRECTED SOIL MOISTURE SENSOR MEASUREMENT (micro-seconds) TO ' VOLUMETRIC SOIL WATER CONTENT CS616_SM(I) = -0.0663+CS616_us(I)*(-0.0063+CS616_us(I)*0.0007) Next I EndIf 'END 5-MINUTE MEASUREMENT LOOP ''''''''''''''''''''''''''''''''''''''''''''''''' '' '' '' OUTPUT '' '' '' ''''''''''''''''''''''''''''''''''''''''''''''''' 'CALL OUTPUT TABLES CallTable HrlyDiag 'HOURLY DIAGNOSTICS TABLE CallTable HrlyRaw 'HOURLY RAW MEASUREMENTS TABLE CallTable HrlyAtms 'HOURLY ABOVE GROUND MEASUREMENTS TABLE CallTable HrlySubs 'HOURLY SUBSURFACE MEASUREMENTS TABLE CallTable HrlySolr 'HOURLY SOLAR THERMAL MEASUREMENTS TABLE CallTable DalyAtms 'DAILY ABOVE GROUND MEASUREMENTS TABLE CallTable DalySubs 'DAILY SUBSURFACE MEASUREMENTS TABLE CallTable (DalySolr) 'DAILY SOLAR THERMAL MEASUREMENTS TABLE CallTable HrlySnow 'HOURLY SNOW MEASUREMENTS TABLE NextScan EndProg